package com.fancy.imasclient.client;

import com.fancy.common.dto.AlbumBasicInfo;
import com.fancy.common.dto.ArtistBasicInfo;
import com.fancy.common.dto.SongBasicInfo;
import com.fancy.common.dto.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "music-service", path = "/api/v1", contextId = "musicServiceClient")
public interface MusicServiceClient {

    /**
     * 获取歌曲基本信息
     */
    @GetMapping("/songs/internal/{songId}")
    Result<SongBasicInfo> getSongBasicInfo(@PathVariable("songId") Long songId);

    /**
     * 批量获取歌曲信息
     */
    @PostMapping("/songs/internal/batch")
    Result<List<SongBasicInfo>> getSongBasicInfoBatch(@RequestBody List<Long> songIds);

    /**
     * 检查歌曲是否为VIP歌曲
     */
    @GetMapping("/songs/internal/{songId}/vip-status")
    Result<Boolean> isVipSong(@PathVariable("songId") Long songId);

    /**
     * 获取专辑基本信息
     */
    @GetMapping("/albums/internal/{albumId}")
    Result<AlbumBasicInfo> getAlbumBasicInfo(@PathVariable("albumId") Long albumId);

    /**
     * 批量获取专辑信息
     */
    @PostMapping("/albums/internal/batch")
    Result<List<AlbumBasicInfo>> getAlbumBasicInfoBatch(@RequestBody List<Long> albumIds);

    /**
     * 获取歌手基本信息
     */
    @GetMapping("/artists/internal/{artistId}")
    Result<ArtistBasicInfo> getArtistBasicInfo(@PathVariable("artistId") Long artistId);

    /**
     * 批量获取歌手信息
     */
    @PostMapping("/artists/internal/batch")
    Result<List<ArtistBasicInfo>> getArtistBasicInfoBatch(@RequestBody List<Long> artistIds);
}
